<template>
  <div>
    <el-table :data="withDraw" height="498">
      <el-table-column prop="id" label="序号" width="80" />
      <el-table-column prop="date" label="提现日期" align="center" />
      <el-table-column prop="getMoney" label="提现金额" align="center" />
      <el-table-column prop="account" label="收款账户" align="center" />
      <el-table-column prop="states" label="提现状态" align="center" />
      <el-table-column prop="declare" label="说明" />
    </el-table>
  </div>
</template>

<script setup>
import { reactive, ref } from "vue";
import { getMoneyRecord } from "../../api/SaleFinance.js";

const withDraw = ref([]);
function getMoneyData() {
  getMoneyRecord().then((res) => {
    console.log(res);
    res.data.getmoney.forEach((item, index) => {
      if (
        item.getMoney === null ||
        item.getMoney === "" ||
        item.getMoney === "string"
      ) {
        res.data.getmoney[index].getMoney = "111";
      }
      res.data.getmoney[index].account = "" ? "" : "123456789";
      res.data.getmoney[index].declare = "" ? "" : "无";
    });
    withDraw.value = res.data.getmoney;
    // console.log(res.data.getmoney);
  });
}
getMoneyData();
</script>

<style lang="less" scoped>
.el-table {
  font-size: 12px;
}
</style>
